#ifndef __SERVER_HPP__
#define __SERVER_HPP__

#include "winux.hpp"
#include <string>
#include <memory>
#include "core.hpp"
#include "broad.hpp"
#include "room.hpp"
#include "user/user.hpp"
#include "user/user_client_ctx.hpp"
#include "message/message.hpp"

//todo: 改名
class MyServer : public Broad {
public:
    eiennet::ws::WsHttpServer<UserClientCtx> server;
    std::string path;
    // std::shared_ptr<Room> roomSharePtr;
    Room* room;
    
    void userEnterRoom( User* user );
    void run();
    MyServer ( std::string const& path, uint port );
    ~MyServer();

    winux::Mixed getInfo();
};

#endif  //__SERVER_HPP__
